package com.M10.BE.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.M10.BE.R;
import com.M10.BE.inventory.OnlineInActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;

/**
 * @author 盘点
 * @desc
 * @time 2018/3/6 10:37
 */

public class FrgInventory extends Fragment {
    @BindView(R.id.btn_inventory_unline)
    Button btnInventoryUnline;
    @BindView(R.id.btn_inventory_online)
    Button btnInventoryOnline;
    Unbinder unbinder;

    public static FrgInventory newInstance() {
        FrgInventory fragment = new FrgInventory();
        return fragment;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.frg_inventory, container, false);

        unbinder = ButterKnife.bind(this, view);
        return view;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        unbinder.unbind();
    }

    @OnClick({R.id.btn_inventory_unline, R.id.btn_inventory_online})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.btn_inventory_unline:
                break;
            case R.id.btn_inventory_online:
                startActivity(new Intent(getActivity(), OnlineInActivity.class));
                break;
        }
    }
}
